cmake_minimum_required (VERSION 3.5)

# 包含头文件
include_directories(../include/libusb-1.0)
# 包含库文件
link_directories(${PROJECT_SOURCE_DIR}/third/libusb/MinGW64/static)
#link_libraries(../MinGW64/static/libusb-1.0.a)

#√
#link_libraries(C:\\Users\\admin\\OneDrive\\workspace\\c\\hello-c\\third\\libusb\\MinGW64\\static\\libusb-1.0.a)


# 链接库文件
#link_libraries(libusb-1.0)
#
#find_package(PkgConfig REQUIRED)
#
## libusb
#pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
#link_directories(${LIBUSB_LIBRARY_DIRS})
#link_libraries(${LIBUSB_LIBRARIES})

# 添加执行
add_executable(testlibusb testlibusb.c)

#✔
target_link_libraries(testlibusb usb-1.0)


add_executable(examples-xusb xusb.c)
target_link_libraries(examples-xusb usb-1.0)

add_executable(examples-listdevs listdevs.c)
target_link_libraries(examples-listdevs usb-1.0)